import {GETMOVIELIST} from "../constant/movieConstant"

const init = {
  movieList: []
}

export default function countReducer(preState = init, action) {
  const { type, data } = action

  switch (type) {
    case GETMOVIELIST:
      return {
        ...preState,
        movieList: data
      }
  }
  return preState
}